let sty = {
    colorAlpha0: 'rgba(0,0,0,0)',
    box: (str = 'v', just = 'center', align = 'center') => {
        if (just === 'start') {
            just = 'flex-start'
        } else if (just === 'end') {
            just = 'flex-end'
        }
        if (align === 'start') {
            align = 'flex-start'
        } else if (align === 'end') {
            align = 'flex-end'
        }
        let flexDirection = 'column'
        if (str === 'v') {
            flexDirection = 'column'
        }
        else if (str === '-v') {
            flexDirection = 'column-reverse'
        }
        else if (str === 'h') {
            flexDirection = 'row'
        }
        else if (str === '-h') {
            flexDirection = 'row-reverse'
        }
        return {
            flex: 1,
            justifyContent: just,
            alignItems: align,
            flexDirection: flexDirection,
        }
    },
    TSR: (T = null, S = null, R = null, K = null, P = null) => {
        let trans = []
        if (T) {
            if (T[0]) {
                trans.push({ translateX: T[0] || 0 })
            }
            if (T[1]) {
                trans.push({ translateY: T[1] || 0 })
            }
        }
        if (S) {
            if (S[0]) {
                trans.push({ scaleX: S[0] || 1 })
            }
            if (S[1]) {
                trans.push({ scaleY: S[1] || 1 })
            }
        }
        if (R) {
            if (R[0]) {
                trans.push({ rotateZ: R[0] + 'deg' || '0deg' })
            }
            if (R[1]) {
                trans.push({ rotateX: R[1] + 'deg' || '0deg' })
            }
            if (R[2]) {
                trans.push({ rotateY: R[2] + 'deg' || '0deg' })
            }
        }
        if (K) {
            if (K[0]) {
                trans.push({ skewX: K[0] || 1 })
            }
            if (K[1]) {
                trans.push({ skewY: K[1] || 1 })
            }
        }
        if (P) {
            trans.push({ perspective: P || 300 })
        }
        return trans
    }
}

export default sty
